import QtQuick 2.0

Rectangle {
    id:page1
    visible: true
    width: 640
    height: 480
    color: "red"
    Text{
        id:name
        anchors.centerIn:page1
        text: qsTr("home.qml")
    }
    MouseArea{
        width:200
        height: 200
        anchors.left:page1.left
        anchors.top: page1.top
        onClicked:
        {
             console.debug("page1点击");
              var component = Qt.createComponent("qrc:/page2.qml");
             if (component.status === Component.Ready) {
                 var bQml = component.createObject(mainHome);
                 page1.visible=false;
             }
        }
    }
}
